import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false

Vue.filter("addPrice", (value, n) => {
  return (+value).toFixed(n)
})

Vue.filter("add$", (value) => {
  return "￥" + value
})
const myUser = "superAdmin" 
Vue.directive("user", {
  bind(el, binding) {
    //初始阶段，执行一次
  },
  inserted(el, binding) {
    if (myUser === binding.value) {
      el.remove()
    }
  },
  update(el,binding) {
    //当前组件内数据更新
    if (myUser === binding.value) {
      el.remove()
    }
  },
  componentUpdated(el,binding) {
    //当前组件和子组件完成更新
  }
})


new Vue({
  render: h => h(App),
}).$mount('#app')